//package com.cooper.scheduler.job;
//
//import java.util.List;
//import java.util.Map;
//import java.util.Map.Entry;
//
//import javax.annotation.Resource;
//
//import org.elasticsearch.common.collect.Lists;
//import org.quartz.Job;
//import org.quartz.JobExecutionContext;
//import org.quartz.JobExecutionException;
//
//import com.cooper.constants.ResourceConstants;
//import com.cooper.service.core.KeygenService;
//import com.cooper.service.core.ZooService;
//
//public class KeygenPersistentJob implements Job {
//	
//	@Autowired
//	private KeygenService keygenService;
//	
//	@Autowired
//	private ZooService zooService;
//
//	@Override
//	public void execute(JobExecutionContext context) throws JobExecutionException {
//		// TODO Auto-generated method stub
//		List<String> getKeygenNameList = Lists.newArrayList();
//		getKeygenNameList.add(this.keygenService.getApplicationName());
//		getKeygenNameList.add(ResourceConstants.ZooKey.RESOURCE_MANAGER);
//		getKeygenNameList.add(ResourceConstants.ZooKey.KEYGEN);
//		
//		try {
//			Map<String, String> keygenData = this.zooService.getChildrenData(getKeygenNameList);
//			for(Entry<String, String> entry: keygenData.entrySet()){
//				this.keygenService.saveEntity(entry.getKey(), Long.parseLong(entry.getValue()));
//			}
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
//
//}
